<template>
	<view class="uiwu">
		<view class="uiwu-box ">
			<image src="@/static/image/nvhai.png" mode="aspectFill"></image>
			<view class="tips">将账号注销后，该账号将60天内无法注册本APP账户</view>
			<view class="title ">以下信息将会被<text class="qj-color-red">清除且无法找回</text></view>
			<view class="content">
				· 账户{{ app.coin_name }}余额被清空 <br>
				· 积分余额被清空<br>
				· 优惠券记录被清空<br>
				· 游戏记录被清空<br>
				· 抓中零食被清空<br>
				· 零食/兑换订单被清空<br>
				· 消费记录被清空等
			</view>
			<view class="btn">
				<text class="uiwu-flex-center qj-bg-red" @tap.stop="TapLogOff">注销账号</text>
				<text class="qj-bg-red"></text>
			</view>
		</view>
	</view>
</template>

<script setup lang="ts">
import { uiwu, writeOffLogin } from '@/api/interface/interface';
import { configStore } from '@/store/configStore';
const { app } = configStore();
const TapLogOff = async (): Promise<any> => {
	uiwu.loading('注销中...', true)
	const result = await writeOffLogin()
	if (!result) return
	uni.clearStorageSync()
	uiwu.hideloading()
	uiwu.toast('注销成功')
	setTimeout(() => {
		uni.navigateTo({
			url: '/pages/index/index'
		})
	}, 400)
}
</script>

<style lang="scss">
page {
	background-color: #F6F6F6;
}

.uiwu {
	padding: 20rpx 24rpx;
}

.uiwu-box {
	background: url('@/static/image/logoff.png') no-repeat 0 0;
	background-size: 100% 100%;
	height: 824rpx;
	padding: 1rpx 60rpx;
	position: relative;

	image {
		width: 128rpx;
		height: 128rpx;
		border-radius: 50%;
		margin: 72rpx auto 40rpx;
		display: block;
	}

	.tips {
		font-size: 24rpx;
		font-weight: 500;
		color: #999999;
	}

	.title {
		font-size: 32rpx;
		font-weight: 800;
		margin-top: 40rpx;

	}

	.content {
		font-size: 24rpx;
		font-weight: 500;
		color: #444444;
		margin-top: 24rpx;
	}

	.btn {
		position: absolute;
		bottom: 150rpx;
		left: 22%;

		text {
			width: 368rpx;
			height: 80rpx;
			border-radius: 40rpx;
			border: 3rpx solid #231815;
			position: absolute;
			left: -5rpx;
			top: -6rpx;
			z-index: 9;
			font-size: 32rpx;
			font-weight: bold;
			color: #FFFFFF;

			&:nth-child(2) {
				z-index: 8;
				left: 5rpx;
				top: 6rpx;
			}
		}
	}
}
</style>
